home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / win / pascal / alrmtpw.exe / ALARM.TXT < prev    next >
Text File  |  1991-09-09  |  5KB  |  136 lines

  1. File:          Alarm.txt
  2. Created:       Mon Sep 09 00:25:29 1991
  3. Description:   Program documentation for
  4.                TPW Application "Alarm"
  5.  
  6. // STARTBLOCK  File Version Information  (REGENERATE)
  7. Regenerated:   Mon Sep 09 00:25:29 1991
  8. Skeleton by:   Winpro/3, a product from Louis J. Cutrona, Jr.
  9.                tpw.skl version 0.05
  10. // ENDBLOCK
  11.  
  12.  
  13.  
  14. A L A R M   --  D O C U M E N T A T I O N
  15.  
  16.  
  17. Overview: Application files and their contents
  18.  
  19. Alarm.pas - Main Pascal program file
  20.      - tAlarm
  21.          - application object
  22.          - derived from TApplication
  23.          - overrides InitInstance and InitMainWindow
  24.      - tAlarmWindow
  25.          - main window object
  26.          - derived from TWindow
  27.          - includes command-id-based methods for
  28.            menu items and accelerator keys.
  29. AlarRC.pas - Pascal unit
  30.      - const definitions for resource file identifiers
  31. AlarGbl.pas - Pascal unit
  32.      - type definitions, vars, and initialization code
  33.        for dialog data transfer buffers
  34.      - code to preload and access strings
  35.        from the string table resource
  36. AlarDlg.pas - Pascal unit
  37.      - dialog objects derived from TDialog.
  38.      - includes child-id-based methods for handling
  39.        messages from each dialog control
  40. Alarm.rc - Resource definition file
  41.      - definitions of application resources: dialogs, menus, icons, etc.
  42. AlarRC.h - C #defines for resource definition file
  43.      - Required to compile resource definition file Alarm.rc
  44.        and create Alarm.res using the rc.exe resource compiler.
  45. Alarm.txt - This documentation file
  46.  
  47.  
  48. A p p l i c a t i o n   O b j e c t  --  AlarmApplication
  49.  
  50. The required application object (type tAlarm).  Creates
  51. and displays the main window.  Processes Windows messages.
  52. Handles termination.
  53.  
  54. Defined in AlarmMain.pas.  At the very end of that file,
  55. you will find the main block of the program, which defines
  56. AlarmApplication, initializes it, runs it, and finally
  57. destroys it.
  58.  
  59.      tAlarm.InitInstance does initialization that needs
  60.      to be performed once for each execution (instance) of
  61.      Alarm:  Reads in any strings to be preloaded from the
  62.      string table resource in Alarm.rc.  Loads the application's
  63.      default accelerator table resource (NULL).
  64.  
  65.      tAlarm.InitMainWindow constructs the window object
  66.      that will serve as Alarm's main window.  This method
  67.      calls the main window's constructor, which eventually 
  68.      calls TWindowsObject.Register, which in turn calls 
  69.      tAlarmWindow.GetWindowClass which loads and sets the
  70.      main window's icon (ALARM_ICON) resource and sets the main window's
  71.      default menu (ALARM_MENU).
  72.  
  73.  
  74.  
  75. A p p l i c a t i o n   M a i n   W i n d o w   O b j e c t
  76.  
  77. The main window object for Alarm is defined in the main program file
  78. AlarMain.pas and has the type name tAlarmWindow.  Also defined
  79. there is a corresponding pointer type tpAlarmWindow.  A pointer to the
  80. main window object is stored in the variable TApplication.MainWindow, which
  81. is inherited by tAlarm (and thus may also be referred to as
  82. tAlarm.MainWindow) 
  83.  
  84.  
  85.  
  86. M e n u   I t e m s   a n d   A c c e l e r a t o r   K e y s
  87.  
  88. For each menu item defined in the resource definition file, there is
  89. a corresponding (command-message-based) method defined for the main
  90. window object type tAlarmWindow.  The name of the method is created
  91. by appending "Method" to the symbolic identifer corresponding to the
  92. menu item or accelerator key in the resource definition file.  Thus,
  93. the following menu and accelerator key command methods are defined:
  94.  
  95.      dlg_SetAlarmTimeMethod
  96.           Action: Invokes modal dialog dlg_SetAlarmTime.
  97.      idmALARMONMethod
  98.           Action: none (displays message box).
  99.      idmALARMOFFMethod
  100.           Action: none (displays message box).
  101.      dlg_AboutAlarmMethod
  102.           Action: Invokes modal dialog dlg_AboutAlarm.
  103.      STDCLOSEMethod
  104.           Action: none (displays message box).
  105.      idmHIDEMethod
  106.           Action: none (displays message box).
  107.  
  108.  
  109. D i a l o g s
  110.  
  111. The following dialog types, descended from TDialog, are defined in the
  112. unit AlarDlg (in file AlarDlg.pas).  Within each type are
  113. control object pointers corresponding to each control in the dialog.
  114. These pointers are initialized in the dialog's constructor.  The order
  115. of initialization is, and must be, the same as the order of declaration
  116. of the corresponding fields in the dialog's data transfer record type.
  117. Also in each type are child-id-based methods corresponding to each
  118. dialog control.  By modifying these methods, you can customize each
  119. dialog's behavior.
  120.  
  121.      tdlg_SetAlarmTimeDialog
  122.        - Transfer buffer var dlg_SetAlarmTimeTransferBuf (type rtdlg_SetAlarmTimeTransfer)
  123.        - Child-id-based methods for individual controls
  124.            - ET_MONTHMethod     (Edit text)
  125.            - ET_DAYMethod     (Edit text)
  126.            - ET_YEARMethod     (Edit text)
  127.            - ET_HOURMethod     (Edit text)
  128.            - ET_MINUTEMethod     (Edit text)
  129.            - EM_MESSAGEMethod     (Edit text)
  130.      tdlg_AboutAlarmDialog
  131.        - Transfer buffer var dlg_AboutAlarmTransferBuf (type rtdlg_AboutAlarmTransfer)
  132.        - Child-id-based methods for individual controls
  133.  
  134.  
  135. E N D   O F   F I L E   Alarm.txt
  136.